import socket
def get_local_ip():
    local_ips=["127.0.0.1"]
    for ip in socket.gethostbyname_ex(socket.gethostname())[2]:
        local_ips.append(ip)
    local_ips.sort()
    return local_ips
def decode_data(bytes_arr:bytes)->str:
    try:
        return bytes_arr.decode('utf-8')
    except UnicodeDecodeError:
        try:
            return bytes_arr.decode('GBK')
        except UnicodeDecodeError:
            return bytes_arr.decode('ISO-8859-1','ignore')
        
if __name__=="__main__":
    print(get_local_ip())